using UnityEngine;
using System.Collections;


public class GuiEffects : MonoBehaviour {

    // ----- internal variables -----------------------------------------------
    Shader defaultShader;
    Shader highlightShader;
    Shader selectShader;


    // ----- internal methods -------------------------------------------------
    void Start() {
        defaultShader   = Shader.Find("Particles/Alpha Blended");
        highlightShader = Shader.Find("Particles/Additive");
        selectShader    = Shader.Find("GUI/Text Shader");

        MenuHandler menu = GetComponent<MenuHandler>();
        if (menu) {
            foreach (Transform item in menu.objects) {
                item.renderer.material.shader = defaultShader;
            }
        }
    }

    void Menu_Highlight(Transform item) {
        item.renderer.material.shader = highlightShader;
    }

    void Menu_Unhighlight(Transform item) {
        item.renderer.material.shader = defaultShader;
    }

    void Menu_Select(Transform item) {
        item.renderer.material.shader = selectShader;
    }
}
